﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Marketplace.Engine;
using Marketplace.Engine.Model;
using Marketplace.Engine.Repository;
using Marketplace.Engine.Repository.Generic;

namespace Marketplace.WebForm
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            PropertyRepository<RentProperty> re = new RentPropertyRepository();
            RentProperty p = new RentProperty();
            p.Name = TextBox1.Text;
            p.Address = "";
            p.AvailableDate = DateTime.Now;
            p.BedroomCount = 2;
            p.City = "london";
            //re.Insert(p);

            ListCondition<RentProperty> listCondition = new ListCondition<RentProperty>( t=> t.Id == 1);

            var result = re.GetList(listCondition);

            var pp = re.GetById(listCondition);


        }
    }
}